package com.jia.springcloud.service.impl;

import com.jia.springcloud.dao.DeptDao;
import com.jia.springcloud.pojo.Dept;
import com.jia.springcloud.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 1038940655
 * @create 2021/1/13 17:32
 */
@Service
public class DeptServiceImpl implements DeptService {

    @Autowired
    private DeptDao deptDao;

    @Override
    public int addDept(Dept dept) {
        return deptDao.addDept(dept);
    }

    @Override
    public int deleteDept(Integer deptno) {
        return deptDao.deleteDept(deptno);
    }

    @Override
    public List<Dept> queryDept() {
        return deptDao.queryDept();
    }

    @Override
    public Dept queryDeptById(Integer deptno) {
        return deptDao.queryDeptById(deptno);
    }
}
